unit FormInputVector;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, VectorTypes, StdCtrls;

type
  TFrmInputVector = class(TForm)
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Edit1: TEdit;
    Edit2: TEdit;
    Edit3: TEdit;
    btnOK: TButton;
    procedure btnOKClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
    VectorInput: TVector3f;
  end;

implementation

{$R *.dfm}

procedure TFrmInputVector.btnOKClick(Sender: TObject);
begin
  try
    VectorInput.X := StrToFloat(Edit1.Text);
    VectorInput.Y := StrToFloat(Edit2.Text);
    VectorInput.Z := StrToFloat(Edit3.Text);
  except
    on e:EConvertError do begin
      MessageDlg(e.Message, mtError, [mbOK], 0);
      Exit;
    end;
  end;
  ModalResult := mrOK;
end;

end.
